<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="stylesheet" type="text/css" href="<c:url value = '/css/bootstrap.css'/>" />
<script type="text/javascript" src="<c:url value='/js/bootstrap.js' />" /></script>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Motos</title>
</head>
<body>
	<div class="container">
		<legend >Cadastro de Motos</legend>
		<form class="form-horizontal" action="<c:url value='/salvar' />">
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span6">
				
						<div class="control-group">
							<label class="control-label" for="modelo">Modelo</label>
							<div class="controls">
								<input id="modelo" type="text" name="moto.modelo" placeholder="modelo"
									value="${moto.modelo}">
							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="cc">Cilindradas</label>
							<div class="controls">
								<input id="cc" type="text" name="moto.cc" placeholder="cilindradas"
									value="${moto.cc}">
							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="ano">Ano</label>
							<div class="controls">
								<input id="ano" type="text" name="moto.ano" placeholder="ano"
									value="${moto.ano}">
							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="p">Preco</label>
							<div class="controls">
								<input id="p" type="text" name="moto.preco" placeholder="preco"
									value="${moto.preco}">
							</div>
						</div>

					<button type="submit" class="btn">Salvar</button>

				</div>
				<div class="span4">
						<span class="help-block">Qual o fabricante?</span><br/> 
						<label
							class="radio"> <input id="honda" type="radio"
							name="moto.marca" value="Honda"> Honda
						</label> <label class="radio"> <input id="suzuki" type="radio"
							name="moto.marca" value="Suzuki"> Suzuki
						</label> <label class="radio"> <input id="yamaha" type="radio"
							name="moto.marca" value="Yamaha"> Yamaha
						</label>
				</div>
			</div>
		</div>
		</form>
		<br/>
		
		<table id="tabelaMotos" class="table" align="center" style="width: 600px">
			<thead>
				<tr>
					<th>Modelo</th>
					<th>Ano</th>
					<th>Cilindradas</th>
					<th>Preco</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${motus}" var="moto">
					<tr>
						<td><a>${moto.modelo}</a></td>
						<td><a>${moto.ano}</a></td>
						<td><a>${moto.cc}</a></td>
						<td><a>${moto.preco}</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
</html>
